export default (doms1: string, doms2: string, doms3: string, num: number) => {
  // var title1 = document.querySelectorAll(doms1);
  // var line = document.querySelectorAll(doms2);
  // var itemBox = document.querySelectorAll(doms3);
  // console.log('num', num);
  // for (let i = 0; i < num; i++) {
  //   console.log(title1[i] as HTMLElement);
  //   itemBox[i].addEventListener('mouseenter', () => {
  //     (line[i] as HTMLElement).style.width = `${(title1[i] as HTMLElement).offsetWidth}px`;
  //     (line[i] as HTMLElement).style.transition = `all 0.5s`;
  //   });
  //   itemBox[i].addEventListener('mouseleave', () => {
  //     (line[i] as HTMLElement).style.width = `0px`;
  //   });
  // }
};
export const imgEnter = (index: number, list: any) => {
  let lineWidth = document.querySelectorAll(`.line${list[index].id}`);
  let titleText = document.querySelectorAll(`.titleText${list[index].id}`);
  (lineWidth[0] as HTMLElement).style.width = `${(titleText[0] as HTMLElement).offsetWidth}px`;
  (lineWidth[0] as HTMLElement).style.transition = `width 0.5s`;
};
export const imgLeave = (index: number, list: any) => {
  let lineWidth = document.querySelectorAll(`.line${list[index].id}`);
  (lineWidth[0] as HTMLElement).style.width = `0px`;
  (lineWidth[0] as HTMLElement).style.transition = `width 0.5s`;
};
